package com.cityos.android.mystudynestedscroll.common.utils

import android.view.MotionEvent
import androidx.core.view.MotionEventCompat

/**
 * @author hailong
 * @date 2024年03月04日 10:24
 *
 *
 * You never know what you can do until you try !
 * ----------------------------------------------------------------
 */
object MotionEventPrinter {

    fun getEventNameStr(event: MotionEvent?): String {
        if (event == null) {
            return "null"
        }
        return when (event.action) {
            MotionEvent.ACTION_DOWN   -> "Down"
            MotionEvent.ACTION_MOVE   -> "MOVE"
            MotionEvent.ACTION_UP     -> "Up"
            MotionEvent.ACTION_CANCEL -> "Cancel"
            else                      -> "Unknown"
        }

    }
}